<%-- 
    Document   : AddAddOns
    Created on : Nov 10, 2012, 6:23:32 AM
    Author     : sony
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>Include AddOns</title>
        <script type="text/javascript">
            function addon(e,price){
                //addon(this,+)
                if(e.checked){
                    document.getElementById("").value = document.getElementById("").value + price;
                }
            }
            
        </script>
    </head>
    <body>
        
        <form>
            <div>
                Total Room Price:<input type="label" name="price" value="<%= request.getAttribute("roomprice")%>" readonly="true"/>
            </div>
            <div>
                <table>
                    <tr>
                        <td>Add-On Roomwise
                            <c:forEach items="${addons}" var="addon">
                                <div>   <input type="checkbox" name="roomwise" />${addon.addonname} 
                        </c:forEach>
                        </td>
                        <td>
                            <div>Add-On Personwise
                                <c:forEach items="${addons}" var="addon">
                                    <div>     <input type="checkbox" name="personwise" value="${addon.addonname}"  />${addon.addonname}</div>
                                </c:forEach>
                                 No. of Persons:<select>
                    <option value="1">1</option>
                    <option value="1">2</option>
                    <option value="1">3</option>
                    <option value="1">4</option>
                    <option value="1">5</option>
                    <option value="1">6</option>
                    <option value="1">7</option>
                    
                </select>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
           
            <div>
                Add-On Price:<input type="label" name="addonprice" readonly="true" value="0" readonly="true"/>
            </div>
            <div>
                Total Price:<input type="label" name="totalprice" readonly="true" value="<%= request.getAttribute("roomprice")%>" readonly="true"/>
            </div>
            <div>
                <input type="Submit" value="Add Add-On" onClick="addon()"/>
                <input type="button" value="No,Thanks" onClick=""/>
                </div>
                
        </form>
    </body>
</html>
